package com.webflux.mapper;

import com.webflux.entity.TbCity;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import reactor.core.publisher.Flux;

public interface TbCityRepository extends ReactiveCrudRepository<TbCity, Integer> {
    @Query("SELECT * FROM tb_city WHERE city_name LIKE CONCAT('%',:cityName,'%')")
    Flux<TbCity> findByNameLike(String cityName);
}
